package com.learn.spring.boot.config.springbootconfig.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties("nio.endpoint")
public class NioEndpointProperties {
    private int maxThreads;
    private int connectTimeout;
    private String threadName;

    public String getThreadName() {
        return threadName;
    }

    public void setThreadName(String threadName) {
        this.threadName = threadName;
    }

    public int getMaxThreads() {
        return maxThreads;
    }

    public void setMaxThreads(int maxThreads) {
        this.maxThreads = maxThreads;
    }

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    @Override
    public String toString() {
        return "NioEndpointProperties{" +
                "maxThreads=" + maxThreads +
                ", connectTimeout=" + connectTimeout +
                ", threadName='" + threadName + '\'' +
                '}';
    }
}
